﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MainPage.master" AutoEventWireup="true" CodeFile="AreasManage.aspx.cs" Inherits="Manage_AreasManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/Manage/Js/AreasManage.js"></script>
<script type="text/javascript">
    SelectOptionOfCity = '<%=SelectOptionOfCity %>'
    SelectOptionOfProvince = '<%=SelectOptionOfProvince %>'
    ModelOfArea =<%=new Areas().ToJsonString() %>;
</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td align="center"><img src="/Manage/Images/sousuo.gif" />请选择省份：

      <select name="ddlProvinceIDOfSearch" id="ddlProvinceIDOfSearch" onchange="QueryCities(this.options[this.selectedIndex].value,'ddlCityIDOfSearch')">
        <option value="">--不限--</option>
         <%=SelectOptionOfProvince %>
        </select>
       请选择城市：
       <select name="ddlCityIDOfSearch" id="ddlCityIDOfSearch">
         <option value="">--不限--</option>
         <%=SelectOptionOfCity%>
       </select>
       &nbsp;区域名称：
      <input name="txtKeyWords" type="text" id="txtKeyWords" size="25"  class="border6"/>
             &nbsp;&nbsp;
       <input name="btnSearch" type="button" id="btnSearch" value="执行搜索" class="btn2" onclick="GoToSearch();" /> &nbsp;&nbsp; [ <a href="AreasManage.aspx" class="red bold">查看全部</a> ]</td>
  </tr>
</table>
<br />
<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr >
    <td colspan="8" align="left" class="HeadTitle">&gt;&gt;区域管理</td>
    </tr>
  <tr class="TableHeadRow">
    <td width="60" align="center">编号</td>
    <td align="left">区域名称</td>
    <td width="150" align="center">所属城市</td>
    <td width="150" align="center">所属省份</td>
    <td width="60" align="center">排序值</td>
    <td width="150" align="center">最后调整日期</td>
    <td width="150" align="center">创建日期</td>
    <td width="150" align="center">管理 [<a href="javascript:Add();" class="red">+添加区域</a>] </td>
  </tr>

  <%
      if (listOfAreas != null)
      {
          for (int i = 0; i < listOfAreas.Count; ++i)
          {
              AreaInfo a = listOfAreas[i];
   %>
  <tr onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';" >
    <td align="center"><%=(p.CurPage-1)*p.PageSize +i+1 %>.</td>
    <td align="left"><a href="javascript:void(0);" onclick="Edit(<%=a.Area.AreaID%>);"><%=a.Area.AreaName%> (ID=<%=a.Area.AreaID%>)</a></td>
    <td align="center" ><a href="<%=Utility.GetNewUrl("CityID",a.Area.CityID.ToString(),false) %>" title="点击查看该城市下所有区域信息"><%=a.CityName %></a></td>
    <td align="center" ><a href="<%=Utility.GetNewUrl("ProvinceID",a.Province.ID.ToString(),false) %>" title="点击查看该省份下所有区域信息"><%=a.Province.Name %></a></td>
    <td align="center" class="green bold" ><%=a.Area.OrderValue %></td>
    <td align="center"><%=a.Area.LastModifyDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center"><%=a.Area.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center">[ <a href="javascript:void(0);" onclick="Edit(<%=a.Area.AreaID%>);">编辑</a> ] [ <a href="javascript:void(0);" onclick="Delete(<%=a.Area.AreaID%>);" class="red">删除</a> ]     </td>
  </tr>
   <%} %>
   <tr>
    <td colspan="8" align="center" ><span class="page" >
         <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), p.CurPage, p.PageSize,10, p.TotalCount)%>    
        </span></td>
    </tr>

   <%} 
    else
{%>
  <tr>
    <td colspan="8" align="center" class="red">[ 未找到任何信息！]</td>
    </tr>
    <%} %>
</table>

</asp:Content>

